home *** CD-ROM | disk | FTP | other *** search
/ SunSoft Catalyst CDWARE 1996 May to August / Catalyst CDWARE 1996 May to August.iso / .products / .bin / httpd / Solaris_2 / register.pl < prev    next >
Perl Script  |  1996-03-15  |  2KB  |  44 lines

  1. #!./perl
  2. #Includes cgi-lib file; if cgi-lib doesn't exist, returns malformed
  3. #header error
  4. do "cgi-lib.pl" || die "Fatal Error: Can't load cgi library";
  5. #calls the subroutine in the cgi-lib.pl library
  6. #to read in the variables from the form and set them up
  7. #as key=value pairs in the array @in
  8. &ReadParse;
  9. #tells http server incoming data is text html
  10. print "Content-type: text/html\n\n";
  11. #returns acknowledgment of mail submission and provides a link back
  12. print "<HTML>";
  13. print "<HEAD><TITLE>Thank You\!</TITLE>";
  14. print "</HEAD><BODY>";
  15. print "<H2>Thank you\!</H2>";
  16. print "<P>";
  17. print "We've mailed off your information.";
  18. print "<HR>";
  19. print "<H3>Back to the <A HREF=\"/index.html\">";
  20. print "Home Page</A></H3>";
  21. print "</BODY></HTML>";
  22. #assigns process id to $pid
  23. $pid=$$;
  24. #opens up comment file for writing
  25. open(COMMENTSFILE,">/tmp/my_comment.$pid");
  26. #enter the form data into the file to be mailed
  27. print COMMENTSFILE "CONTACT MAILING LIST REPORT\n";
  28. print COMMENTSFILE "- - - - - - - - - - - - - - - - - -\n";
  29.  
  30. print COMMENTSFILE "\"$in{'first_name'}\",\"$in{'last_name'}\",\"$in{'title'}\",\"$in{'org'}\",\"$in{'address'}\",";
  31. print COMMENTSFILE "\"$in{'mailstop'}\",\"$in{'city'}\",\"$in{'state'}\",\"$in{'zip'}\",\"$in{'country'}\",";
  32. print COMMENTSFILE "\"$in{'phone'}\",\"$in{'fax'}\",\"$in{'email'}\"\n";
  33. print COMMENTSFILE "\"$in{'info_action'}\",\"$in{'mcad'},\"$in{'mcad-seats'}\",\"$in{'ecad'}\",\"$in{'ecad-seats'}\",";
  34. print COMMENTSFILE "\"$in{'tpubs'}\",\"$in{'tpubs-seats'}\",\"$in{'solution'}\",\"$in{'solution-other'}\",";
  35. print COMMENTSFILE "\"$in{'platform'}\",\"$in{'need-timeframe'}\"";
  36. #close out file to be mailed
  37. close COMMENTSFILE;
  38. #sends comment file as mail to user
  39. $command="/usr/ucb/mail cdcatalyst@workgroup.com < /tmp/my_comment.$pid";
  40. system($command);
  41. #erases temp file
  42. unlink("/tmp/my_comment.$pid");
  43.  
  44.